// import '@babel/polyfill'
import Vue from "vue";
import router from '@/router'
import '@/common/common.less';

import Skin from "@/component/skin";
Vue.component(Skin.name, Skin);

import AmountControl from "@/component/amount-control";
Vue.component(AmountControl.name, AmountControl);

import SelectControl from "@/component/select-control";
Vue.component(SelectControl.name, SelectControl);

import ControlSelect from "@/component/ControlSelect";
Vue.component(ControlSelect.name, ControlSelect);

import ControlAmount from "@/component/ControlAmount";
Vue.component(ControlAmount.name, ControlAmount);

import ControlPassword from "@/component/ControlPassword";
Vue.component(ControlPassword.name, ControlPassword);

import ControlDialog from "@/component/ControlDialog";
Vue.component(ControlDialog.name, ControlDialog);

import ControlLine from "@/component/ControlLine";
Vue.component(ControlLine.name, ControlLine);

import RateChart from '@/component/RateChart';
Vue.component(RateChart.name,RateChart);

import PlanIcon from '@/component/PlanIcon';
Vue.component(PlanIcon.name, PlanIcon);

import Vue2TouchEvents from 'vue2-touch-events'
Vue.use(Vue2TouchEvents)

import '@/db/dose';
import '@/db/advance';
import '@/db/rate';
import '@/db/excharge';
import '@/db/machine';
import '@/db/MenuSwitch';

import image from '@/assets/youbeng-bg.png'
let v = new Vue({
    data:{
        loaded: false
    },
    el: "#app",
    router,
    created(){
        const vm =this;
        const d = document.createElement('img');
        d.setAttribute('src', image);
        d.addEventListener('load', function(){
            vm.loaded = true;
        })
    }
});
